#!/bin/bash

echo $1

if [ "$1" == "clean" ]; then
    echo "Cleaning..."
    rm -rf build
    rm ./*.exe
    exit 0
fi

if [ "$1" == "build" ] || [ -z "$1" ]; then
    rm ./build/ -rf

    cmake -B build

    cmake --build build --config Release

    cp ./build/*.exe ./
    exit 0
fi

if [ "$1" == "install" ]; then
    
    adb -s 172.32.0.93:5555 push ./*.exe /root 

    exit 0
fi

if [ "$1" == "py" ]; then
    
    adb -s 172.32.0.93:5555 push ./*.py /root 

    exit 0
fi